//
//  DTBizNavigation.m
//  PersonalManager
//
//  Created by hsd on 16/8/9.
//  Copyright © 2016年 Haiyun.Qian. All rights reserved.
//

#import "DTBizNavigation.h"
#import "DTBizNavigationAction.h"

@implementation DTBizNavigation

/** 设置导航栏文字 */
- (void)setTitle:(DTJavascriptCommand *)command{
    
    self.action = [[DTBizNavigationAction alloc] initWithCommand:command];
    command.actionObject = self.action;
    [self.action setTitle];
}

/** 设置导航栏图标 */
- (void)setIcon:(DTJavascriptCommand *)command{
    self.action = [[DTBizNavigationAction alloc] initWithCommand:command];
    command.actionObject = self.action;
    [self.action setIcon];
}

/** 设置导航栏左侧按钮 */
- (void)setLeft:(DTJavascriptCommand *)command{
    self.action = [[DTBizNavigationAction alloc] initWithCommand:command];
    command.actionObject = self.action;
    [self.action setLeft];
}

/** 设置浏览器关闭按钮 */
- (void)close:(DTJavascriptCommand *)command{
    self.action = [[DTBizNavigationAction alloc] initWithCommand:command];
    command.actionObject = self.action;
    [self.action close];
}

/** 设置导航栏右侧单个按钮 */
- (void)setRight:(DTJavascriptCommand *)command{
    self.action = [[DTBizNavigationAction alloc] initWithCommand:command];
    command.actionObject = self.action;
    [self.action setRight];
}

/** 设置导航栏右侧多个按钮 */
- (void)setMenu:(DTJavascriptCommand *)command{
    self.action = [[DTBizNavigationAction alloc] initWithCommand:command];
    command.actionObject = self.action;
    [self.action setMenu];

}

/** 打电话 */
- (void)call:(DTJavascriptCommand *)command {
    self.action = [[DTBizNavigationAction alloc] initWithCommand:command];
    command.actionObject = self.action;
    [self.action call];
}

@end
